home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16810 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: news.zocalo.net!news
  2. From: Paul Hsieh <qed@xenon.chromatic.com>
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: Thu, 11 Apr 1996 21:04:58 -0700
  6. Organization: Zocalo Engineering - Berkeley, California, USA
  7. Message-ID: <316DD66A.5CEB@xenon.chromatic.com>
  8. References: <4icpp9$7hr@barad-dur.nas.com> <4imqe4$cj3@ping1.ping.be> <1996Mar23.224853.116513@kuhub.cc.ukans.edu> <4j52hn$ikb@news.ios.com> <Pine.OSF.3.91.960403112207.17337H-100000@bud.cc.swin.edu.au> <aidan-0404961557290001@meathook.intac.com> <pnoguchi-0404962135210001@pnoguchi.his.com> <aidan-0604961847480001@meathook.intac.com> <316a2987.3677177@news.cyberport.com> <316C722E.528A@his.com>
  9. NNTP-Posting-Host: paulh.chromatic.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Tom Daniels wrote:
  16. > My question is this:  If you are writing non system type programs
  17. > (I include games in this category), why in the world would you
  18. > ever resort to such a hack as to assign a raw address to a function
  19. > pointer.  
  20.  
  21. On the fly compiled code maybe?  There are certain tasks where on-the-
  22. fly compilation (Sprites are *NOT* one of them by the way) is the best
  23. solution (in terms of performance.)  For example, let's say you are
  24. writing a program that plot's fractals, but want to let the user enter
  25. any formula possible.  Then for performance reasons you would want to
  26. be able to *compile* the function, before attempting to plot the 
  27. fractal.
  28.  
  29. > [...] It's that sort of crap (that is easy to do even by
  30. > accident) that C is infamous for.  As a program manager heading a
  31. > project, I would shoot at dawn, the first programmer who pulled this
  32. > kind of crap.
  33.  
  34. That's not a very flexible attitude.  I suppose the scope of your 
  35. company is not very big.  Don't write anything performance sensitive 
  36. do you?  In many situations its easy to have that sort of idealistic
  37. attitude.
  38.  
  39. > [...] If you gotta do that stuff, you've misdesigned your program 
  40. > structure somewhere.
  41.  
  42. I disagree.
  43.  
  44. > Then again, if you're writing a system kernel or something like that
  45. > it doesn't matter quite so much, 
  46.  
  47. Well, you have few choices in that case, now don't you?  How on earth
  48. could you launch new programs without doing something of this nature?
  49.  
  50. > [...] but still it leaves a terrible taste in my mouth.
  51.  
  52. Sorry to hear that.
  53.  
  54. -- 
  55. Paul Hsieh
  56. qed@xenon.chromatic.com
  57. Graphics Programmer
  58. Chromatic Research
  59.  
  60. What I say and what my company says are not always the same thing
  61.